package com.song.corebean;

import java.io.Serializable;

public class Host implements Serializable{
	
	
	private String address;
	
	private int port;

	
	
	

	public Host(String address, int port) {
		super();
		this.address = address;
		this.port = port;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}
	
	
	@Override
	public boolean equals(Object obj) {
		if(obj==null)
			return false;
		Host host = (Host) obj;
		if(this.address.equals(host.address) && this.port==host.port)
			return true;
		return false;
	}
	
	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return super.hashCode();
	}

	@Override
	public String toString() {
		return "Host [address=" + address + ", port=" + port + "]";
	}
	
	
	
}
